import request from '@/utils/request'
export default{
  // 查询所有，为了支持导出全部数据的功能
  getAll(){
    return request({
      url: `/servicetech/industry-research/findAll`,
      method: 'get'
    })
  },
  // 带条件的分页查询
  getListByPage(current, limit, queryObject) {
    return request({
      url: `/servicetech/industry-research/pageQueryCondition/${current}/${limit}`,
      method: 'post',
      data: queryObject
    })
  },
  // 添加
  add(tech) {
    return request({
      url: `/servicetech/industry-research/add`,
      method: 'post',
      data: tech
    })
  },
  // 根据id查询
  getById(id) {
    return request({
      url: `/servicetech/industry-research/getById/${id}`,
      method: 'get'
    })
  },

  // TODO：机器审核单条接口
  machineAuditOne(tech) {
    return request({
      url: `/servicetech/industry-research/machineOne`,
      method: 'put',
      data: tech
    })
  },

  // TODO：机器审核批量接口
  machineAuditBatch(list) {
    return request({
      url: `/servicetech/industry-research/machineBatch`,
      method: 'put',
      data: list
    })
  },

  // 人工审核批量接口
  updateOne(tech) {
    return request({
      url: `/servicetech/industry-research/updateOne`,
      method: 'put',
      data: tech
    })
  },  

  // 人工批量审核通过接口
  updateBatch(list) {
    return request({
      url: `/servicetech/industry-research/updateBatch`,
      method: 'put',
      data: list
    })
  },

  // 人工批量审核不通过接口
  updateBatchNotPass(list) {
    return request({
      url: `/servicetech/industry-research/updateBatchNotPass`,
      method: 'put',
      data: list
    })
  },

  // 人工发布单条
  publishOne(tech) {
    return request({
      url: `/servicetech/industry-research/publishOne`,
      method: 'put',
      data: tech
    })
  },

  // 人工发布批量
  publishBatch(list) {
    return request({
      url: `/servicetech/industry-research/publishBatch`,
      method: 'put',
      data: list
    })
  },
}
